<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: blfwk::Command Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classblfwk_1_1_command.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classblfwk_1_1_command-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">blfwk::Command Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents a bootloader command.  
 <a href="classblfwk_1_1_command.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_command_8h_source.html">Command.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for blfwk::Command:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classblfwk_1_1_command__inherit__graph.svg" width="372" height="1102"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for blfwk::Command:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classblfwk_1_1_command__coll__graph.svg" width="663" height="307"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa0a4a4e68422e1f76c2bfdd472a36583"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0a4a4e68422e1f76c2bfdd472a36583"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#aa0a4a4e68422e1f76c2bfdd472a36583">~Command</a> ()</td></tr>
<tr class="memdesc:aa0a4a4e68422e1f76c2bfdd472a36583"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:aa0a4a4e68422e1f76c2bfdd472a36583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19293e9923df7730149f95084159d9a8"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a19293e9923df7730149f95084159d9a8">init</a> ()</td></tr>
<tr class="memdesc:a19293e9923df7730149f95084159d9a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize.  <a href="#a19293e9923df7730149f95084159d9a8">More...</a><br /></td></tr>
<tr class="separator:a19293e9923df7730149f95084159d9a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c5616ea53b2386c5f6dd5ca42e8f750"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c5616ea53b2386c5f6dd5ca42e8f750"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a8c5616ea53b2386c5f6dd5ca42e8f750">sendTo</a> (<a class="el" href="classblfwk_1_1_packetizer.html">Packetizer</a> &amp;packetizer)</td></tr>
<tr class="memdesc:a8c5616ea53b2386c5f6dd5ca42e8f750"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send command to packetizer and on to peripheral. <br /></td></tr>
<tr class="separator:a8c5616ea53b2386c5f6dd5ca42e8f750"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad5b73025e9f648a46a595aabda920e3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad5b73025e9f648a46a595aabda920e3"></a>
virtual const uint32_vector_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#aad5b73025e9f648a46a595aabda920e3">getResponseValues</a> () const </td></tr>
<tr class="memdesc:aad5b73025e9f648a46a595aabda920e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get response values vector. <br /></td></tr>
<tr class="separator:aad5b73025e9f648a46a595aabda920e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ca41fdccc42af3cb5fae6ecac27cb0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ca41fdccc42af3cb5fae6ecac27cb0e"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a3ca41fdccc42af3cb5fae6ecac27cb0e">getResponse</a> () const </td></tr>
<tr class="memdesc:a3ca41fdccc42af3cb5fae6ecac27cb0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get response as JSON string. <br /></td></tr>
<tr class="separator:a3ca41fdccc42af3cb5fae6ecac27cb0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3d487f76310ac0b11104a9eef00d2e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3d487f76310ac0b11104a9eef00d2e2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#ad3d487f76310ac0b11104a9eef00d2e2">logResponses</a> () const </td></tr>
<tr class="memdesc:ad3d487f76310ac0b11104a9eef00d2e2"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__logging.html#class_log" title="Wraps a set of static functions for easy global logging access. ">Log</a> the response description. <br /></td></tr>
<tr class="separator:ad3d487f76310ac0b11104a9eef00d2e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa909283ea9160b21d9673b75365f23e6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa909283ea9160b21d9673b75365f23e6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#aa909283ea9160b21d9673b75365f23e6">registerProgress</a> (<a class="el" href="classblfwk_1_1_progress.html">Progress</a> *progress)</td></tr>
<tr class="memdesc:aa909283ea9160b21d9673b75365f23e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">initial the process callback. <br /></td></tr>
<tr class="separator:aa909283ea9160b21d9673b75365f23e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">String arguments accessors.</div></td></tr>
<tr class="memitem:a74034125054c2ea174c8f5f26a902a2e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74034125054c2ea174c8f5f26a902a2e"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a74034125054c2ea174c8f5f26a902a2e">getArg</a> (int arg) const </td></tr>
<tr class="memdesc:a74034125054c2ea174c8f5f26a902a2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the specified argument. <br /></td></tr>
<tr class="separator:a74034125054c2ea174c8f5f26a902a2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad538fdc76f96c5166afb6f4440e7d349"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad538fdc76f96c5166afb6f4440e7d349"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#ad538fdc76f96c5166afb6f4440e7d349">getName</a> () const </td></tr>
<tr class="memdesc:ad538fdc76f96c5166afb6f4440e7d349"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the command name (i.e. argv[0]). <br /></td></tr>
<tr class="separator:ad538fdc76f96c5166afb6f4440e7d349"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51145da63794b2996322a873ba8e9b6e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51145da63794b2996322a873ba8e9b6e"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a51145da63794b2996322a873ba8e9b6e">getArgCount</a> () const </td></tr>
<tr class="memdesc:a51145da63794b2996322a873ba8e9b6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of arguments, including the command name. <br /></td></tr>
<tr class="separator:a51145da63794b2996322a873ba8e9b6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:afd742a092a2304b65295059d39d09a65"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classblfwk_1_1_command.html">Command</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#afd742a092a2304b65295059d39d09a65">create</a> (const string_vector_t *argv)</td></tr>
<tr class="memdesc:afd742a092a2304b65295059d39d09a65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an appropriate command subclass.  <a href="#afd742a092a2304b65295059d39d09a65">More...</a><br /></td></tr>
<tr class="separator:afd742a092a2304b65295059d39d09a65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1418f272fd270abeb27d0ecbc9569d74"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1418f272fd270abeb27d0ecbc9569d74"></a>
static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a1418f272fd270abeb27d0ecbc9569d74">getStatusMessage</a> (status_t code)</td></tr>
<tr class="memdesc:a1418f272fd270abeb27d0ecbc9569d74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a status code description. <br /></td></tr>
<tr class="separator:a1418f272fd270abeb27d0ecbc9569d74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ad805b9ee39a4ab9cdfe6584590e2ce11"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad805b9ee39a4ab9cdfe6584590e2ce11"></a>
<a class="el" href="classblfwk_1_1_progress.html">Progress</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#ad805b9ee39a4ab9cdfe6584590e2ce11">m_progress</a></td></tr>
<tr class="memdesc:ad805b9ee39a4ab9cdfe6584590e2ce11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variable for progress control. <br /></td></tr>
<tr class="separator:ad805b9ee39a4ab9cdfe6584590e2ce11"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a592dccb30df743284e6a12d59f874d23"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a592dccb30df743284e6a12d59f874d23">Command</a> (const string_vector_t *argv)</td></tr>
<tr class="memdesc:a592dccb30df743284e6a12d59f874d23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that takes a command name and list of arguments.  <a href="#a592dccb30df743284e6a12d59f874d23">More...</a><br /></td></tr>
<tr class="separator:a592dccb30df743284e6a12d59f874d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1bf9f0fd9a1d8091ca1bfa22fe1b2bf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#aa1bf9f0fd9a1d8091ca1bfa22fe1b2bf">Command</a> (const char *const name)</td></tr>
<tr class="memdesc:aa1bf9f0fd9a1d8091ca1bfa22fe1b2bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that takes a command name.  <a href="#aa1bf9f0fd9a1d8091ca1bfa22fe1b2bf">More...</a><br /></td></tr>
<tr class="separator:aa1bf9f0fd9a1d8091ca1bfa22fe1b2bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a843db425431389b432cff5ebbb389046"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a843db425431389b432cff5ebbb389046">processResponse</a> (const generic_response_packet_t *packet, uint8_t commandTag)</td></tr>
<tr class="memdesc:a843db425431389b432cff5ebbb389046"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check generic response packet.  <a href="#a843db425431389b432cff5ebbb389046">More...</a><br /></td></tr>
<tr class="separator:a843db425431389b432cff5ebbb389046"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:abfb8748889d575faae835df892f5a637"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abfb8748889d575faae835df892f5a637"></a>
string_vector_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#abfb8748889d575faae835df892f5a637">m_argv</a></td></tr>
<tr class="memdesc:abfb8748889d575faae835df892f5a637"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector of argument strings. <br /></td></tr>
<tr class="separator:abfb8748889d575faae835df892f5a637"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33facfaf717322568f444f3b9250755d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33facfaf717322568f444f3b9250755d"></a>
uint32_vector_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a33facfaf717322568f444f3b9250755d">m_responseValues</a></td></tr>
<tr class="memdesc:a33facfaf717322568f444f3b9250755d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector of response values. <br /></td></tr>
<tr class="separator:a33facfaf717322568f444f3b9250755d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6077654f4fffadd3ef014ce142f72f43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6077654f4fffadd3ef014ce142f72f43"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_command.html#a6077654f4fffadd3ef014ce142f72f43">m_responseDetails</a></td></tr>
<tr class="memdesc:a6077654f4fffadd3ef014ce142f72f43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Descriptive response. <br /></td></tr>
<tr class="separator:a6077654f4fffadd3ef014ce142f72f43"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a bootloader command. </p>
<p>Do not instantiate this class. Instead, use the <a class="el" href="classblfwk_1_1_command.html#afd742a092a2304b65295059d39d09a65" title="Create an appropriate command subclass. ">create()</a> method to create the appropriate subclass based on command name in argv[0]. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a592dccb30df743284e6a12d59f874d23"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">blfwk::Command::Command </td>
          <td>(</td>
          <td class="paramtype">const string_vector_t *&#160;</td>
          <td class="paramname"><em>argv</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor that takes a command name and list of arguments. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argv</td><td>Argument vector </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa1bf9f0fd9a1d8091ca1bfa22fe1b2bf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">blfwk::Command::Command </td>
          <td>(</td>
          <td class="paramtype">const char *const&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor that takes a command name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Name of the command </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="afd742a092a2304b65295059d39d09a65"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classblfwk_1_1_command.html">Command</a> * Command::create </td>
          <td>(</td>
          <td class="paramtype">const string_vector_t *&#160;</td>
          <td class="paramname"><em>argv</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an appropriate command subclass. </p>
<p>Pass the command name in argv[0] and optional arguments in the rest of the string vector. Caller is responsible for deleting the returned object.</p>
<p>This factory method is just a shorthand for creating a subclass directly, for example: </p><div class="fragment"><div class="line">string_vector_t cmdv;</div><div class="line">cmdv.push_back(<span class="stringliteral">&quot;my-reset&quot;</span>);</div><div class="line">Reset * reset = <span class="keyword">new</span> Reset(&amp;cmdv);</div><div class="line">reset-&gt;init();</div><div class="line"><a class="code" href="classblfwk_1_1_command.html#a592dccb30df743284e6a12d59f874d23">Command</a> * cmd = reset;</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argv</td><td>Argument vector </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname"><a class="el" href="classblfwk_1_1_command.html" title="Represents a bootloader command. ">Command</a></td><td>object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a19293e9923df7730149f95084159d9a8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool blfwk::Command::init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize. </p>
<p>Subclasses should implement <a class="el" href="classblfwk_1_1_command.html#a19293e9923df7730149f95084159d9a8" title="Initialize. ">init()</a> to check for valid arguments. </p>

<p>Reimplemented in <a class="el" href="classblfwk_1_1_configure_can.html#a10136c0e44d3b35d785bb5857ac8a8b6">blfwk::ConfigureCan</a>, <a class="el" href="classblfwk_1_1_configure_spi.html#a7d2adb1421e31e2ceb1668e8685aceca">blfwk::ConfigureSpi</a>, <a class="el" href="classblfwk_1_1_configure_i2c.html#ac18c726d5ab97e290a867c72f3a901e0">blfwk::ConfigureI2c</a>, <a class="el" href="classblfwk_1_1_flash_image.html#a1fe9304ed2ab866e81c8903e34d0b7b7">blfwk::FlashImage</a>, <a class="el" href="classblfwk_1_1_reliable_update.html#a4ba90fd854c6b52b2058308ac0e44780">blfwk::ReliableUpdate</a>, <a class="el" href="classblfwk_1_1_configure_quad_spi.html#acaa2bd44cb51e26f2c0696532278e40d">blfwk::ConfigureQuadSpi</a>, <a class="el" href="classblfwk_1_1_flash_read_resource.html#a859d1a561109014448f417ca6142175d">blfwk::FlashReadResource</a>, <a class="el" href="classblfwk_1_1_flash_read_once.html#acabdc1352feb6296b005499a249ec361">blfwk::FlashReadOnce</a>, <a class="el" href="classblfwk_1_1_flash_program_once.html#a6f4fde79c408820a45c83e0eb3ea50f0">blfwk::FlashProgramOnce</a>, <a class="el" href="classblfwk_1_1_flash_security_disable.html#a7a6a3fc24599db34b208067ecfab4d04">blfwk::FlashSecurityDisable</a>, <a class="el" href="classblfwk_1_1_call.html#a79c6befe7dff2a412d44f3d1e6968423">blfwk::Call</a>, <a class="el" href="classblfwk_1_1_execute.html#a06839f26ae9ae1dcd3879696763ea73a">blfwk::Execute</a>, <a class="el" href="classblfwk_1_1_receive_sb_file.html#a88a5ebb73260d81e0909f26b587f8041">blfwk::ReceiveSbFile</a>, <a class="el" href="classblfwk_1_1_fill_memory.html#aa5e484968cd7cd5e779339294d4ef21b">blfwk::FillMemory</a>, <a class="el" href="classblfwk_1_1_write_memory.html#af0816f15266dd6a862b54d4f422db160">blfwk::WriteMemory</a>, <a class="el" href="classblfwk_1_1_read_memory.html#ab2abac726b567f4b13fb0a7908a719b0">blfwk::ReadMemory</a>, <a class="el" href="classblfwk_1_1_flash_erase_all_unsecure.html#a5d5e291f1fe7806875ff3485d8c49c6b">blfwk::FlashEraseAllUnsecure</a>, <a class="el" href="classblfwk_1_1_flash_erase_all.html#ac57b3133340f499b7d84700287023e1f">blfwk::FlashEraseAll</a>, <a class="el" href="classblfwk_1_1_flash_erase_region.html#aa75a5fd1d4e747d8c535f65e3b7cf972">blfwk::FlashEraseRegion</a>, <a class="el" href="classblfwk_1_1_set_property.html#ae7f7580b5d137ad60b78b68e0fe5c779">blfwk::SetProperty</a>, <a class="el" href="classblfwk_1_1_get_property.html#af934a542ff9744d1c60ce78db5758008">blfwk::GetProperty</a>, and <a class="el" href="classblfwk_1_1_reset.html#a4fe3f927e58d4e5df6dffc7266b2acaf">blfwk::Reset</a>.</p>

</div>
</div>
<a class="anchor" id="a843db425431389b432cff5ebbb389046"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Command::processResponse </td>
          <td>(</td>
          <td class="paramtype">const generic_response_packet_t *&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>commandTag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check generic response packet. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packet</td><td>Packet received from device </td></tr>
    <tr><td class="paramname">commandTag</td><td>Expected command tag in packet </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_command_8h_source.html">Command.h</a></li>
<li>Command.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>blfwk</b></li><li class="navelem"><a class="el" href="classblfwk_1_1_command.html">Command</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:51 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
